﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ei="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
                    xmlns:ee="clr-namespace:Microsoft.Expression.Media.Effects;assembly=Microsoft.Expression.Effects"
                    xmlns:tl="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit">
	<Style TargetType="tl:TransitioningContentControl"
	       x:Key="specialTransition">
		<Setter Property="HorizontalContentAlignment"
		        Value="Stretch" />
		<Setter Property="VerticalContentAlignment"
		        Value="Stretch" />
		<Setter Property="HorizontalAlignment"
		        Value="Stretch" />
		<Setter Property="VerticalAlignment"
		        Value="Stretch" />

		<Setter Property="Transition"
		        Value="DefaultTransition" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="tl:TransitioningContentControl">
					<Border BorderBrush="{TemplateBinding BorderBrush}"
					        BorderThickness="{TemplateBinding BorderThickness}"
					        Background="{TemplateBinding Background}"
					        CornerRadius="2">
						<VisualStateManager.CustomVisualStateManager>
							<ei:ExtendedVisualStateManager />
						</VisualStateManager.CustomVisualStateManager>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="PresentationStates">
								<VisualStateGroup.Transitions>
									<VisualTransition GeneratedDuration="0:0:0.3">
										<ei:ExtendedVisualStateManager.TransitionEffect>
											<ee:SlideInTransitionEffect />
										</ei:ExtendedVisualStateManager.TransitionEffect>
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)"
											                               Storyboard.TargetName="PreviousContentPresentationSite">
												<DiscreteObjectKeyFrame KeyTime="0:0:0.5">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualTransition>
								</VisualStateGroup.Transitions>
								<VisualState x:Name="DefaultTransition">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
										                               Storyboard.TargetProperty="(UIElement.Visibility)"
										                               Storyboard.TargetName="PreviousContentPresentationSite">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Collapsed</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Normal">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
										                               Storyboard.TargetProperty="(UIElement.Visibility)"
										                               Storyboard.TargetName="PreviousContentPresentationSite">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Collapsed</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Grid>
							<ContentPresenter x:Name="PreviousContentPresentationSite"
							                  ContentTemplate="{TemplateBinding ContentTemplate}"
							                  Content="{x:Null}"
							                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
							                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
								<ContentPresenter.RenderTransform>
									<TransformGroup>
										<ScaleTransform />
										<SkewTransform />
										<RotateTransform />
										<TranslateTransform />
									</TransformGroup>
								</ContentPresenter.RenderTransform>
							</ContentPresenter>
							<ContentPresenter x:Name="CurrentContentPresentationSite"
							                  ContentTemplate="{TemplateBinding ContentTemplate}"
							                  Content="{x:Null}"
							                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
							                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
								<ContentPresenter.RenderTransform>
									<TransformGroup>
										<ScaleTransform />
										<SkewTransform />
										<RotateTransform />
										<TranslateTransform />
									</TransformGroup>
								</ContentPresenter.RenderTransform>
							</ContentPresenter>
						</Grid>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>